<%@page import="com.swlz.entity.Role"%>
<%@page import="com.swlz.entity.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>


<html>
  <head>
    <title></title>
	<jsp:include page="/admin/head.jsp"/>
  </head>
  <body>
	<jsp:include page="/admin/header.jsp"/>
	<jsp:include page="/admin/left-menu.jsp"><jsp:param value="1" name="index"/></jsp:include>
	<jsp:include page="/admin/footer.jsp"/>



    <!--中间-->
    <section>
      <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
          <li class="breadcrumb-item">管理首页</li>
          <li class="breadcrumb-item">系统中心</li>
          <li class="breadcrumb-item">用户管理</li>
          <li class="breadcrumb-item active">修改用户</li>
        </ol>
      </nav>
		
		      <div class="card container-md">
        <div class="card-body">
          <form name="updateForm" action="admin/user.let?action=updateUser" method="POST">
           <input type="hidden" name="userId" value="${user.userId }"/>
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>用户名</label>
              <div class="col-sm-9">
                <input disabled="disabled" readonly="readonly" pattern="^[a-zA-Z]\w{2,19}$" name="userName" type="text" placeholder="由3到20个单词字符组成"
                  title="由3到20个单词字符组成" class="form-control" value="${user.getUserName()}">
              </div>
            </div>

            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>昵称</label>
              <div class="col-sm-9">
              
                <input required="required" name="userNickname" type="text" pattern="^[\u4100-\u9fa5]{2,8}$" placeholder="由2到8个汉字组成"
                  title="由2到8个汉字组成" class="form-control" value="${user.getUserNickname()}">
              </div>
            </div>
            
           
            
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right"><b class="text-danger">*</b>性别</label>
              <div class="col-sm-9 pt-2">
               <label class="mr-2"><input type="radio" name="userSex" value="true"${user.getUserSex()?" checked=\"checked\"":"" }>男</label> 
               <label class="mr-2"> <input type="radio" name="userSex" value="false"${!user.getUserSex()?" checked=\"checked\"":"" }>女</label>
              </div>
            </div>
            
            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right">出生日期</label>
              <div class="col-sm-9">
               <input type="date" name="userBrithdate"  class="form-control" style="width:auto;" value="${t.formatDate(user.userBrithdate)}"/>
              </div>
            </div>

            <div class="form-group row">
              <label class="col-sm-3 col-form-label text-right">电话</label>
              <div class="col-sm-9">
                <input name="userPhone" type="tel" placeholder="有11位数字组成" class="form-control" value="${user.userPhone}">
              </div>
            </div>

            
            

            <div class="form-group row">
              <div class="col-sm-9 offset-sm-3">
                <button class="btn btn-primary" type="button" onclick="history.go(-1);">返回 </button>
                <button class="btn btn-danger" type="submit"><i class="fa fa-edit mr-2"></i>修改 </button>
              </div>
            </div>

          </form>
        </div>
      </div>
    </section>
    
  </body>
</html>
